package com.biz.primus.ms.commodity.trans;

import com.biz.primus.commodity.vo.backend.VendorProductDetailVo;
import com.biz.primus.ms.commodity.dao.po.Product;
import com.google.common.base.Function;

/**
 * 转换器(商品 --> 商户商品详情(已审核通过) Vo)
 * 未设置商家名称, 商品扩展属性
 * @author david-liu
 * @date 2016年12月26日
 * @reviewer
 * @see
 */
public class Product2VendorProductDetailVo implements Function<Product, VendorProductDetailVo> {

    @Override
    public VendorProductDetailVo apply(Product po) {
        VendorProductDetailVo vo = new VendorProductDetailVo();
        vo.setId(String.valueOf(po.getId()));
        vo.setProductCode(po.getProductCode());
        vo.setName(po.getName());
        vo.setVendorId(String.valueOf(po.getVendorId()));
        vo.setSubTitle(po.getSubTitle());
        vo.setBreif(po.getBreif());
        vo.setBrandId(String.valueOf(po.getBrandId()));
        vo.setCategoryId(String.valueOf(po.getCategoryId()));
        vo.setIntroImages(po.getIntroImages());
        vo.setLogo(po.getLogo());
        vo.setImages(po.getImages());
        vo.setInAudit(po.getInAudit());
        vo.setSeoKeywords(po.getSeoKeywords());
        return vo;
    }
}
